package com.hkg.springcloud.controller;

import com.hkg.newbackage.ApplicationConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName : OrderController
 * @Author : 坏老爷
 * @Date: 2020-04-03 16:07
 */
@RestController
@Slf4j
public class OrderController {
    public static final String INVOME_URL = "http://cloud-provider-payment";

    @Resource
    // private RestTemplate restTemplate;
    private ApplicationConfig applicationConfig; //修改默认配置

    @GetMapping("/consumer/payment/zk")
    public String payment() {
        String result = applicationConfig.getRestTemplate().getForObject(INVOME_URL + "/payment/zk", String.class);
        return result;
    }


}
